<script>
export default {
    onLaunch: function() {
        wx.startLocationUpdate({
        	success(resp){
        		console.log('开启定位成功');
        	},
        	fail(resp){
        		console.log('开启定位失败');
        	}
        });
        wx.onLocationChange(function(resp){
        	let latitude=resp.latitude;
        	let longitude=resp.longitude;
        	let location={latitude:latitude,longitude:longitude};
        	uni.$emit('updateLocation',location);
        });
    },
    onShow: function() {
        console.log('App Show');
    },
    onHide: function() {
        console.log('App Hide');
    }
};
</script>

<style lang="scss">
@import "uview-ui/index.scss";
</style>
